# Contributor: Chloe Kudryavtsev <code@toast.bunkerlabs.net>
# Maintainer:
pkgname=spampd
pkgver=2.61
pkgrel=1
pkgdesc="An L/SMTP proxy that marks spam using spamassassin"
url="http://www.worlddesign.com/index.cfm/page/software/open-source/spampd.htm"
arch="noarch !x86" # perl-mail-spamassassin->perl-db
license="GPL-2.0-or-later"
depends="perl-net-server perl-mail-spamassassin"
install="spampd.pre-install"
subpackages="$pkgname-openrc"
source="
	spampd.confd
	spampd.initd
	$pkgname-$pkgver.tar.gz::https://github.com/mpaperno/$pkgname/archive/$pkgver.tar.gz
	"
pkgusers="spampd"
pkggroups="spampd"

check() {
	./spampd.pl --version
}

package() {
	install -m755 -D "$builddir/$pkgname.pl" "$pkgdir/usr/bin/$pkgname"
	install -m755 -D "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
	install -m644 -D "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
}

sha512sums="
216ab774ac2cc8b54fb8f2155738fd41264b261efd5a7ab95d9910aad5b9699065f42211dbe8021383f0172bfb50cfc9087ea8dc1e53a2223dabd7faf490769c  spampd.confd
4adad6b44509abedcfb5726d09a63b66048468e5ee7942d0e586630a84fb93931f315ed9410894af2cc4e5bff04cd38600ea91cc0b18c3cedd67efe2af6e0e14  spampd.initd
e2f84c4b24648d4f4db70174f04b72981faa1c54ffc4bbc433d14c730ef4ad7fd4cd3772a476f25be0bee103e951700d038634d14848f1eb90849d1a6655199b  spampd-2.61.tar.gz
"
